package com.weiiew.itemtypeservice.controller;

import com.weiiew.common.entity.simple.SimpleType;
import com.weiiew.common.OnlyFeign.OnlyFeign;
import com.weiiew.itemtypeservice.service.ItemTypeServiceImpl;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Description
 * @Author 魏锴
 * @Date 2025/4/3
 */
@RestController
@RequiredArgsConstructor
@RequestMapping("/type/item/feign")
@OnlyFeign
public class ItemTypeFeignController {
    private final ItemTypeServiceImpl itemTypeService;
    @PostMapping("/list")
    public List<SimpleType> getSimpleItemTypes(@RequestParam("version") int version){
        return itemTypeService.getSimpleItemTypes(version);
    }
}
